<template>
  <view class="support-index">
    <view class="demo-nav">
      <view class="demo-nav__title">没钱装修怎么办-平台为您解忧</view>
    </view>
    <view class="support-index-header">
      <view class="support-index-h-top">
        <h2 style="font-size: 1.5rem">没钱装修怎么办?</h2>
        <h3 style="padding: 0.5rem 0">平台为您解忧</h3>
      </view>
      <view class="support-index-h-bottom">
        <view>最高借贷额度</view>
        <view style="margin: 0.5rem 0;font-size: 2rem">1000000</view>
       <view class="zx" style="width: 300rpx;height: 80rpx;background-color: #1989FA;border-radius: 40rpx;text-align: center;line-height: 80rpx;color: #fff;">马上咨询
       	
       </view>
      </view>
    </view>
    <view class="support-index-brand">
      <view style="text-align: left;padding: 1rem;font-size: 0.95rem;font-weight: bolder">合作品牌</view>
      <view class="person-view">
        <swipe @change="onChange"  class="my-swipe" autoplay indicator-color="white">
          <swipe-item v-for="item in CooperativeBrandList">
            <image width="100%" :src="item.cooperativeUrl"/>
          </swipe-item>
          <template #indicator>
            <view class="custom-indicator">{{ current + 1 }}/{{CooperativeBrandList.length}}</view>
          </template>
        </swipe>
        <!--<ul class="person-list" ref="personTab">-->
          <!--<li class="person-item" >-->
            <!--<text v-for="a in indexaa">-->
                <!--<van-image-->
                  <!--width="12rem"-->
                  <!--height="11rem"-->
                  <!--fit="contain"-->
                  <!--style="display: inline-block;padding: 0 5px"-->
                  <!--src="https://img.yzcdn.cn/vant/cat.jpeg"-->
                <!--/>-->
            <!--</text>-->
          <!--</li>-->
        <!--</ul>-->
      </view>
    </view>
    <view class="support-index-process">
      <view style="text-align: left;font-size: 0.95rem;font-weight: bolder">
        申请全流程<text style="color: #ebedf0;font-size: 0.95rem"> APPLICATION PROCESS</text>
      </view>
      <van-icon name="stop" size="1.5rem" style="position: absolute;top: 0.9rem;right: 0.55rem"/>
      <view class="support-index-pro" style="text-align: left;margin-top: 0.5rem">
        <van-steps direction="vertical" inactive-icon="checked" inactive-color="#07c160" active="active" color="#ff8917">
          <van-step>
            <view class="support-index-pros">
              <view class="support-index-pros1">
                <view>名额申请</view>
                <view>资料提交</view>
              </view>
              <view class="support-index-pros2">
                <view style="font-size: 0.9rem;color: black">专业服务</view>
                <view style="font-size: 0.7rem">一对一沟通,省心省力</view>
              </view>
            </view>
          </van-step>
          <van-step>
            <view style="color: #07c160">
              最快三个工作日
            </view>
          </van-step>
          <van-step>
            <view class="support-index-pros">
              <view class="support-index-pros1">
                <view>银行审批</view>
                <view>额度到账</view>
              </view>
              <view class="support-index-pros2">
                <view style="font-size: 0.9rem;color: black">专属高效</view>
                <view style="font-size: 0.7rem">绿色通话,极速审批</view>
              </view>
            </view>
          </van-step>
          <van-step>
            <view style="color: #07c160 ">
              立即
            </view>
          </van-step>
          <van-step>
            <view class="support-index-pros">
              <view class="support-index-pros1">
                <view>装修范畴</view>
                <view>任意消费</view>
              </view>
              <view class="support-index-pros2">
                <view style="font-size: 0.9rem;color: black">专业服务</view>
                <view style="font-size: 0.7rem">不限于专修合同款</view>
              </view>
            </view>
          </van-step>
        </van-steps>
      </view>
    </view>
    <view class="support-index-advantage">
      <view style="text-align: left;font-size: 0.95rem;font-weight: bolder">
        产品优势<text style="color: #ebedf0;font-size: 0.95rem"> PRODUCT SUPERIORITY</text>
      </view>
      <van-icon name="stop" size="1.5rem" style="position: absolute;top: 1rem;right: 0.55rem"/>
      <view style="margin-top: 0.6rem" v-for="item in ProductSuperiorityList" :key="item.index">
        <image width="10rem" height="10rem" fit="cover" :src="item.superiorityUrl"/>
      </view>
    </view>
  </view>
</template>

<script>

  import {
    selectCooperativeBrandByNull,
    selectProductSuperiorityByNull,
  } from '@/api/financialSupport/financial_support.js'
  export default {
    data() {
      return {
        active: [5],
        //合作伙伴集合
        CooperativeBrandList:[],
        //产品优势集合
        ProductSuperiorityList:[],
        current: 0,
      };
    },
    //页面渲染前加载
    created(){
      this.getselectCooperativeBrandByNull();
      this.getselectProductSuperiorityByNull();
    },
    //方法
    methods: {
      toBack(){
        this.$router.go(-1);//返回上一层
      },
      //查询全部的合作伙伴
      getselectCooperativeBrandByNull(){
        selectCooperativeBrandByNull().then((res)=>{
          this.CooperativeBrandList = res.data.data;
          console.log(res,"123");
        })
      },
      //查询全部的产品优势
      getselectProductSuperiorityByNull(){
        selectProductSuperiorityByNull().then((res)=>{
          this.ProductSuperiorityList = res.data.data;
          console.log(res,"456");
        })
      },
      //轮播点击
      onChange(index) {
        this.current = index;
      },

    }
  }
</script>

<style scoped>
  .demo-nav{
    position: relative;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    height: 56px;
    background-color: #fff;
    font-size: 1.1rem;
  }
  .demo-nav__back{
    position: absolute;
    top: 16px;
    left: 16px;
    width: 24px;
    height: 24px;
    cursor: pointer;
  }
  .support-index-header{
    background-color: #ebedf0;
    padding: 1rem;
  }
  .support-index-h-top{
    text-align: left;
  }
 .support-index-h-bottom{
   background-color: #ffffff;
   margin-top: 0.5rem;
   padding: 1rem 0;
  }
  .support-index-process{
    padding: 1rem;
    position: relative
  }
  .support-index-process .support-index-pros1{
    display: inline-block;
    background-color: #07c160;
    text-align:left;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
  }
  .support-index-process .support-index-pros2{
    display: inline-block;
    text-align: left;
    padding-left: 0.5rem;
  }
  .support-index-advantage{
    padding: 1rem;
    position: relative
  }
  .person-view{
    margin-left: 15px;
    margin-right: 15px;
    overflow: auto;         /*核心样式*/
  }
  .person-list{
    white-space: nowrap;    /*核心样式*/
  }
  .person-item{
    width: 90%;
    height: auto;
    font-size: 14px;
    line-height: 44px;
    text-align: center;
    display: inline-block;  /*核心样式*/
    *zoom:1;
    *display:inline;
    vertical-align:top;
  }

  .custom-indicator {
    position: absolute;
    right: 5px;
    bottom: 5px;
    padding: 2px 5px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.1);
  }
  .my-swipe .swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 250px;
    text-align: center;
    background-color: #39a9ed;
  }


</style>
